<template>
  <div class="app-portal-body">
    <div class="app-portal-menucontent" v-if="app">
      <div class="app-form-group-label">任务分组</div>
      <TaskTree
        :app-id="app.group_id"
        @select="handleSelectTask"
        style="width:100%;height:100%;"
      />
    </div>
    <TaskInfo
      v-if="currentData"
      :current-data="currentData"
      class="h-full mr-0 mt-0 mb-0"
    />
  </div>
</template>

<script setup>
import TaskTree from '../basic/task/task-tree.vue';
import TaskInfo from '../basic/task/task-info.vue';
import {ref} from "vue";

const props = defineProps({
  app: Object,
})

const currentData = ref(null);

const handleSelectTask = (data) => {
  currentData.value = data;
}
</script>
